﻿<html>
    <head>
        <title>${message(code:'site.title')}</title>
		<meta name="layout" content="main" />
    </head>
    <body>
    <g:javascript>
       function setGender(gender) {
        document.myform.targetGender.value = gender
       }
    </g:javascript>
    
    <h1 style="margin-left:20px;">${message(code:'site.catchword')}</h1>
    <g:form class="container" name="myform" style="margin-top:100px;" method="post" controller ="searchWithoutLogon">
      <div><img src="${resource(dir:'images',file:'logo.jpg')}" alt="${message(code:'site.title')}" /></div>

      ${message(code:'label.i_am_at')}
      <g:select
          name="mycity"
          from="${City.list()}"
          optionValue="name"
          optionKey="id"/>
      <p/>

      ${message(code:'label.i_have_a_book')}
      <g:textField name="mybook"/>
      <p/>
      
      <g:hiddenField name="targetGender" value="F" />

      ${message(code:'label.find_who_is_interested')}
      <span class="menuButton"><g:actionSubmit value="${message(code:'label.sex.male')}" action="search" 
                                               onclick="return setGender('M');"/></span>
      <span class="menuButton"><g:actionSubmit value="${message(code:'label.sex.female')}" action="search"
                                               onclick="return setGender('F');"/></span>
      <span class="menuButton"><g:actionSubmit value="${message(code:'label.sex.all')}" action="search"
                                               onclick="return setGender('A');"/></span>

      
      <g:if test="${flash.message}">
        <div class="errors">
        <ul>
            <li>${flash.message}</li>
        </ul>
          </div>
      </g:if>
      
    </g:form>
     
    </body>
</html>